package com.atguigu.yygh.hosp.controller.admin;

import com.atguigu.yygh.common.result.R;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/*==========================================
      时 间:   2022-03-02
      讲 师:   刘  辉
      描 述:   尚硅谷教学团队
 ==========================================*/
@RestController
@RequestMapping("/admin/user")
//@CrossOrigin
public class UserController {


    @PostMapping("/login")
    public R login(){
        return R.ok().data("token", "admin-token");
    }

    @GetMapping("/info")
    public R info(String token){

        return R.ok()
                .data( "roles","[admin]")
                .data("introduction", "I am a super administrator")
                .data("avatar", "https://www13.53kf.com/img/upload/10007377/mobile/temp/mobile_53kf_1610505285.jpg")
                .data( "name","Super Admin");
    }

}
